3.2.46 \(\int \cos ^2(a+b x) \csc (2 a+2 b x) \, dx\) [146]

Optimal. Leaf size=14 \[ \frac {\log (\sin (a+b x))}{2 b} \]

[Out]

1/2*ln(sin(b*x+a))/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4372, 3556} \begin {gather*} \frac {\log (\sin (a+b x))}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^2*Csc[2*a + 2*b*x],x]

[Out]

Log[Sin[a + b*x]]/(2*b)

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4372

Int[(cos[(a_.) + (b_.)*(x_)]*(e_.))^(m_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/e^p, Int[(e*Cos
[a + b*x])^(m + p)*Sin[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \cos ^2(a+b x) \csc (2 a+2 b x) \, dx &=\frac {1}{2} \int \cot (a+b x) \, dx\\ &=\frac {\log (\sin (a+b x))}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 22, normalized size = 1.57 \begin {gather*} \frac {\log (\cos (a+b x))+\log (\tan (a+b x))}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^2*Csc[2*a + 2*b*x],x]

[Out]

(Log[Cos[a + b*x]] + Log[Tan[a + b*x]])/(2*b)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 13, normalized size = 0.93

method result size
default \(\frac {\ln \left (\sin \left (x b +a \right )\right )}{2 b}\) \(13\)
risch \(-\frac {i x}{2}-\frac {i a}{b}+\frac {\ln \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )}{2 b}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^2/sin(2*b*x+2*a),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(sin(b*x+a))/b

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (12) = 24\).
time = 0.27, size = 82, normalized size = 5.86 \begin {gather*} \frac {\log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right )}{4 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(2*b*x+2*a),x, algorithm="maxima")

[Out]

1/4*(log(cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) + log(cos(b*x)
^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2))/b

________________________________________________________________________________________

Fricas [A]
time = 2.82, size = 14, normalized size = 1.00 \begin {gather*} \frac {\log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(2*b*x+2*a),x, algorithm="fricas")

[Out]

1/2*log(1/2*sin(b*x + a))/b

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**2/sin(2*b*x+2*a),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 13, normalized size = 0.93 \begin {gather*} \frac {\log \left ({\left | \sin \left (b x + a\right ) \right |}\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(2*b*x+2*a),x, algorithm="giac")

[Out]

1/2*log(abs(sin(b*x + a)))/b

________________________________________________________________________________________

Mupad [B]
time = 0.16, size = 14, normalized size = 1.00 \begin {gather*} \frac {\ln \left ({\sin \left (a+b\,x\right )}^2\right )}{4\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^2/sin(2*a + 2*b*x),x)

[Out]

log(sin(a + b*x)^2)/(4*b)

________________________________________________________________________________________